home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / tutorials / geometer / generic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.6 KB  |  104 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. #ifndef _GENERIC_APP
  19. #define _GENERIC_APP
  20.  
  21. /* currentfilename is the name of the currently-open file.  If there
  22.  * is none, currentfilename[0] == 0.
  23.  */
  24.  
  25. extern char currentfilename[];
  26.  
  27. /* flags: */
  28.  
  29. extern long    VIEW_ONLY, view_only;
  30. extern long    MAKE_BACKUPS;
  31. extern long    MAKE_CHECKPOINTS;
  32. extern long    foreground_flag, dirtyfile_flag;
  33. extern long     xorg, yorg, xsize, ysize;
  34.  
  35. #define PROG_NAME   "geom"
  36. #define PROG_VERSION    "0.1"
  37.  
  38. #define PULLDOWNHEIGHT 26
  39.  
  40. void handlenewcmd();
  41. void handleopencmd();
  42. void handlesavecmd();
  43. void handlesaveascmd();
  44. void handleinsertcmd();
  45. void handleprintcmd();
  46. void handlequitcmd();
  47. void handleerrorwrite(long);
  48. void handlehelpcmd();
  49. long getfilename(char *, char *, char *, char *, char *, long (*)(char *));
  50. void doopen(char *);
  51. void initsignal();
  52. void getwindowinfo();
  53. void makewintitle();
  54. void setdirtyfile();
  55. void cleardirtyfile();
  56.  
  57. long message(char *, char *, char *, char *);
  58. void writecheckpointfile();
  59. void writebackupfile();
  60. void savemat();
  61. void restoremat();
  62.  
  63. void makepulldown();
  64. void drawpulldown();
  65. long pulldownevent(long, long);
  66. void remakepulldown();
  67.  
  68. #define NEWCMD        100001
  69. #define OPENCMD        100002
  70. #define SAVECMD        100003
  71. #define SAVEASCMD   100004
  72. #define INSERTCMD   100005
  73. #define PRINTCMD    100006
  74. #define QUITCMD        100007
  75. #define HELPCMD        100008
  76.  
  77. #define TOUCHME        100009
  78. #define PRINTEPS    100010
  79.  
  80. long openstatus(char *);
  81.  
  82. /* returns from openstatus() */
  83.  
  84. #define FILE_EXISTS     1
  85. #define CAN_WRITE_FILE    2
  86.  
  87. struct application_entries {
  88.     long    (*readfile)(char *);
  89.     long    (*writefile)(char *);
  90.     long    (*errorwritefile)(char *);
  91.     long    (*insertfile)(char *);
  92.     long    (*printfile)(char *);
  93.     void    (*makecheckpointname)(char *);
  94.     void    (*makebackupname)(char *);
  95.     void    (*clearbuffer)();
  96.     void    (*help)();
  97.     void    (*quit)();
  98.     void    (*exit)();
  99. };
  100.  
  101. extern struct application_entries entries;
  102.  
  103. #endif /* _GENERIC_APP */
  104.